<!DOCTYPE html><html lang="zh-CH" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0,viewport-fit=cover"><title>fixed案例演示 | 一个小站</title><meta name="author" content="温柔目送"><meta name="copyright" content="温柔目送"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="复制粘贴至html文件中即可使用12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788&lt;!DOCTYPE html">
<meta property="og:type" content="article">
<meta property="og:title" content="fixed案例演示">
<meta property="og:url" content="https://watch-with-tenderness.gitee.io/2023/01/10/%E5%89%8D%E7%AB%AF/%E5%AE%9A%E4%BD%8D/fixed%E6%A1%88%E4%BE%8B%E6%BC%94%E7%A4%BA/index.html">
<meta property="og:site_name" content="一个小站">
<meta property="og:description" content="复制粘贴至html文件中即可使用12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788&lt;!DOCTYPE html">
<meta property="og:locale" content="zh_CH">
<meta property="og:image" content="https://jsd.012700.xyz/gh/jerryc127/CDN@latest/cover/default_bg.png">
<meta property="article:published_time" content="2023-01-10T03:29:14.000Z">
<meta property="article:modified_time" content="2023-08-24T10:46:25.528Z">
<meta property="article:author" content="温柔目送">
<meta property="article:tag" content="前端">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://jsd.012700.xyz/gh/jerryc127/CDN@latest/cover/default_bg.png"><link rel="shortcut icon" href="https://img1.imgtp.com/2023/08/25/C7MPeaox.ico"><link rel="canonical" href="https://watch-with-tenderness.gitee.io/2023/01/10/%E5%89%8D%E7%AB%AF/%E5%AE%9A%E4%BD%8D/fixed%E6%A1%88%E4%BE%8B%E6%BC%94%E7%A4%BA/index.html"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//hm.baidu.com"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox/fancybox.min.css" media="print" onload="this.media='all'"><script>var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?09b79322881b2e136ac4c49c1333b6ba";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script><script>const GLOBAL_CONFIG = {
  root: '/',
  algolia: undefined,
  localSearch: undefined,
  translate: undefined,
  noticeOutdate: undefined,
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":200},
  copy: {
    success: 'Copy successfully',
    error: 'Copy error',
    noSupport: 'The browser does not support'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '',
  dateSuffix: {
    just: 'Just',
    min: 'minutes ago',
    hour: 'hours ago',
    day: 'days ago',
    month: 'months ago'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: undefined,
  source: {
    justifiedGallery: {
      js: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery/dist/fjGallery.min.js',
      css: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery/dist/fjGallery.min.css'
    }
  },
  isPhotoFigcaption: false,
  islazyload: false,
  isAnchor: false,
  percent: {
    toc: true,
    rightside: false,
  },
  autoDarkmode: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: 'fixed案例演示',
  isPost: true,
  isHome: false,
  isHighlightShrink: false,
  isToc: true,
  postUpdate: '2023-08-24 18:46:25'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
    win.getCSS = (url,id = false) => new Promise((resolve, reject) => {
      const link = document.createElement('link')
      link.rel = 'stylesheet'
      link.href = url
      if (id) link.id = id
      link.onerror = reject
      link.onload = link.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        link.onload = link.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(link)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          if (t === 'dark') activateDarkMode()
          else if (t === 'light') activateLightMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
    const detectApple = () => {
      if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
        document.documentElement.classList.add('apple')
      }
    }
    detectApple()
    })(window)</script><link rel='stylesheet' href="/css/Kimbiedark.css"><script>var _hmt = _hmt || [];(function() {  var hm = document.createElement("script");  hm.src = "https://hm.baidu.com/hm.js?09b79322881b2e136ac4c49c1333b6ba";  var s = document.getElementsByTagName("script")[0];   s.parentNode.insertBefore(hm, s);})();</script><meta name="generator" content="Hexo 6.3.0"></head><body><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="https://img1.imgtp.com/2023/08/25/UZdslPaP.jpg" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="sidebar-site-data site-data is-center"><a href="/archives/"><div class="headline">Articles</div><div class="length-num">53</div></a><a href="/tags/"><div class="headline">Tags</div><div class="length-num">9</div></a><a href="/categories/"><div class="headline">Categories</div><div class="length-num">28</div></a></div><hr class="custom-hr"/></div></div><div class="post" id="body-wrap"><header class="not-top-img" id="page-header"><nav id="nav"><span id="blog-info"><a href="/" title="一个小站"><span class="site-name">一个小站</span></a></span><div id="menus"><div id="toggle-menu"><a class="site-page" href="javascript:void(0);"><i class="fas fa-bars fa-fw"></i></a></div></div></nav></header><main class="layout" id="content-inner"><div id="post"><div id="post-info"><h1 class="post-title">fixed案例演示</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">Created</span><time class="post-meta-date-created" datetime="2023-01-10T03:29:14.000Z" title="Created 2023-01-10 11:29:14">2023-01-10</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">Updated</span><time class="post-meta-date-updated" datetime="2023-08-24T10:46:25.528Z" title="Updated 2023-08-24 18:46:25">2023-08-24</time></span><span class="post-meta-categories"><span class="post-meta-separator">|</span><i class="fas fa-inbox fa-fw post-meta-icon"></i><a class="post-meta-categories" href="/categories/%E5%89%8D%E7%AB%AF/">前端</a><i class="fas fa-angle-right post-meta-separator"></i><i class="fas fa-inbox fa-fw post-meta-icon"></i><a class="post-meta-categories" href="/categories/%E5%89%8D%E7%AB%AF/%E5%AE%9A%E4%BD%8D/">定位</a></span></div><div class="meta-secondline"><span class="post-meta-separator">|</span><span class="post-meta-pv-cv" id="" data-flag-title="fixed案例演示"><i class="far fa-eye fa-fw post-meta-icon"></i><span class="post-meta-label">Post View:</span><span id="busuanzi_value_page_pv"><i class="fa-solid fa-spinner fa-spin"></i></span></span></div></div></div><article class="post-content" id="article-container"><h1 id="复制粘贴至html文件中即可使用"><a href="#复制粘贴至html文件中即可使用" class="headerlink" title="复制粘贴至html文件中即可使用"></a>复制粘贴至html文件中即可使用</h1><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br></pre></td><td class="code"><pre><code class="hljs plaintext">&lt;!DOCTYPE html&gt;<br>&lt;html lang=&quot;en&quot;&gt;<br>&lt;head&gt;<br>    &lt;meta charset=&quot;UTF-8&quot;&gt;<br>    &lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=edge&quot;&gt;<br>    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;<br>    &lt;title&gt;Document&lt;/title&gt;<br>    &lt;style&gt;<br>        img &#123;<br>            width: 400px;<br>            position: fixed;<br>        &#125;<br>    &lt;/style&gt;<br>&lt;/head&gt;<br>&lt;body&gt;<br>    &lt;img src=&quot;图片路径&quot; alt=&quot;&quot;&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>    &lt;div&gt;温柔目送 邮箱llizhxu789@163.com&lt;/div&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;<br></code></pre></td></tr></table></figure>

<h2 id="代码解释"><a href="#代码解释" class="headerlink" title="代码解释"></a>代码解释</h2><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><code class="hljs plaintext">img &#123;<br>    width: 400px;<br>    position: fixed;<br>&#125;<br></code></pre></td></tr></table></figure>

<p>img 是我选中了body中的img标签<br>修改了大小 width为400px<br>设置了fixed布局<br>意思就是 这个img里面的东西 将会被固定在这个位置 不会随着页面的上下左右来回移动</p>
<p>而大量的div 也只是单纯的顶出浏览器的滑动 可以更加清晰看出 图片被我固定<br>这种方法普遍用于 一些网站用来固定小广告之类的</p>
</article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta">Author: </span><span class="post-copyright-info"><a href="https://watch-with-tenderness.gitee.io">温柔目送</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta">Link: </span><span class="post-copyright-info"><a href="https://watch-with-tenderness.gitee.io/2023/01/10/%E5%89%8D%E7%AB%AF/%E5%AE%9A%E4%BD%8D/fixed%E6%A1%88%E4%BE%8B%E6%BC%94%E7%A4%BA/">https://watch-with-tenderness.gitee.io/2023/01/10/%E5%89%8D%E7%AB%AF/%E5%AE%9A%E4%BD%8D/fixed%E6%A1%88%E4%BE%8B%E6%BC%94%E7%A4%BA/</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta">Copyright Notice: </span><span class="post-copyright-info">All articles in this blog are licensed under <a target="_blank" rel="noopener" href="https://creativecommons.org/licenses/by-nc-sa/4.0/">CC BY-NC-SA 4.0</a> unless stating additionally.</span></div></div><div class="tag_share"><div class="post-meta__tag-list"><a class="post-meta__tags" href="/tags/%E5%89%8D%E7%AB%AF/">前端</a></div><div class="post_share"><div class="social-share" data-image="https://jsd.012700.xyz/gh/jerryc127/CDN@latest/cover/default_bg.png" data-sites="wechat,weibo,qq"></div><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/butterfly-extsrc/sharejs/dist/css/share.min.css" media="print" onload="this.media='all'"><script src="https://cdn.jsdelivr.net/npm/butterfly-extsrc/sharejs/dist/js/social-share.min.js" defer></script></div></div><nav class="pagination-post" id="pagination"><div class="prev-post pull-left"><a href="/2023/01/10/%E5%89%8D%E7%AB%AF/%E5%9F%BA%E7%A1%80%E6%A0%87%E7%AD%BE%E5%AD%A6%E4%B9%A0/%E9%94%9A%E7%82%B9%E9%93%BE%E6%8E%A5/" title="锚点链接"><img class="cover" src="https://jsd.012700.xyz/gh/jerryc127/CDN@latest/cover/default_bg.png" onerror="onerror=null;src='/img/404.jpg'" alt="cover of previous post"><div class="pagination-info"><div class="label">Previous Post</div><div class="prev_info">锚点链接</div></div></a></div><div class="next-post pull-right"><a href="/2023/01/09/hexo/hexo%E4%B8%8A%E7%9A%84%E7%9B%B8%E5%85%B3%E8%AF%AD%E5%8F%A5/" title="hexo上的相关语句"><img class="cover" src="https://jsd.012700.xyz/gh/jerryc127/CDN@latest/cover/default_bg.png" onerror="onerror=null;src='/img/404.jpg'" alt="cover of next post"><div class="pagination-info"><div class="label">Next Post</div><div class="next_info">hexo上的相关语句</div></div></a></div></nav><div class="relatedPosts"><div class="headline"><i class="fas fa-thumbs-up fa-fw"></i><span>Related Articles</span></div><div class="relatedPosts-list"><div><a href="/2023/03/19/%E5%89%8D%E7%AB%AF/Echarts/Echarts/" title="Echarts"><img class="cover" src="https://jsd.012700.xyz/gh/jerryc127/CDN@latest/cover/default_bg.png" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2023-03-19</div><div class="title">Echarts</div></div></a></div><div><a href="/2023/02/01/%E5%89%8D%E7%AB%AF/%E5%9F%BA%E7%A1%80%E6%A0%87%E7%AD%BE%E5%AD%A6%E4%B9%A0/%E5%88%97%E8%A1%A8%E6%A0%87%E7%AD%BE/" title="列表标签"><img class="cover" src="https://jsd.012700.xyz/gh/jerryc127/CDN@latest/cover/default_bg.png" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2023-02-01</div><div class="title">列表标签</div></div></a></div><div><a href="/2023/01/10/%E5%89%8D%E7%AB%AF/%E5%9F%BA%E7%A1%80%E6%A0%87%E7%AD%BE%E5%AD%A6%E4%B9%A0/%E8%B6%85%E9%93%BE%E6%8E%A5/" title="超链接"><img class="cover" src="https://jsd.012700.xyz/gh/jerryc127/CDN@latest/cover/default_bg.png" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2023-01-10</div><div class="title">超链接</div></div></a></div><div><a href="/2023/01/10/%E5%89%8D%E7%AB%AF/%E5%9F%BA%E7%A1%80%E6%A0%87%E7%AD%BE%E5%AD%A6%E4%B9%A0/%E9%94%9A%E7%82%B9%E9%93%BE%E6%8E%A5-%E6%BC%94%E7%A4%BA-1/" title="锚点链接-演示-1"><img class="cover" src="https://jsd.012700.xyz/gh/jerryc127/CDN@latest/cover/default_bg.png" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2023-01-10</div><div class="title">锚点链接-演示-1</div></div></a></div><div><a href="/2023/01/10/%E5%89%8D%E7%AB%AF/%E5%9F%BA%E7%A1%80%E6%A0%87%E7%AD%BE%E5%AD%A6%E4%B9%A0/%E9%94%9A%E7%82%B9%E9%93%BE%E6%8E%A5/" title="锚点链接"><img class="cover" src="https://jsd.012700.xyz/gh/jerryc127/CDN@latest/cover/default_bg.png" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2023-01-10</div><div class="title">锚点链接</div></div></a></div><div><a href="/2023/01/21/%E5%89%8D%E7%AB%AF/%E5%AE%9A%E4%BD%8D/absolute%E6%A1%88%E4%BE%8B%E6%BC%94%E7%A4%BA/" title="absolute案例演示"><img class="cover" src="https://jsd.012700.xyz/gh/jerryc127/CDN@latest/cover/default_bg.png" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2023-01-21</div><div class="title">absolute案例演示</div></div></a></div></div></div><hr class="custom-hr"/><div id="post-comment"><div class="comment-head"><div class="comment-headline"><i class="fas fa-comments fa-fw"></i><span> Comment</span></div></div><div class="comment-wrap"><div><div id="twikoo-wrap"></div></div></div></div></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src="https://img1.imgtp.com/2023/08/25/UZdslPaP.jpg" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">温柔目送</div><div class="author-info__description"></div></div><div class="card-info-data site-data is-center"><a href="/archives/"><div class="headline">Articles</div><div class="length-num">53</div></a><a href="/tags/"><div class="headline">Tags</div><div class="length-num">9</div></a><a href="/categories/"><div class="headline">Categories</div><div class="length-num">28</div></a></div><a id="card-info-btn" target="_blank" rel="noopener" href="https://github.com/xxxxxx"><i class="fab fa-github"></i><span>Follow Me</span></a></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn fa-shake"></i><span>Announcement</span></div><div class="announcement_content">This is my Blog</div></div><div class="card-widget authorMood" id="authorMood"><div class="item-headline"><i></i><span>今日心情</span></div><div class="item-content"></div></div><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="fas fa-stream"></i><span>Catalog</span><span class="toc-percentage"></span></div><div class="toc-content"><ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#%E5%A4%8D%E5%88%B6%E7%B2%98%E8%B4%B4%E8%87%B3html%E6%96%87%E4%BB%B6%E4%B8%AD%E5%8D%B3%E5%8F%AF%E4%BD%BF%E7%94%A8"><span class="toc-number">1.</span> <span class="toc-text">复制粘贴至html文件中即可使用</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E4%BB%A3%E7%A0%81%E8%A7%A3%E9%87%8A"><span class="toc-number">1.1.</span> <span class="toc-text">代码解释</span></a></li></ol></li></ol></div></div><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>Recent Post</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/2023/10/29/%E8%81%8C%E4%B8%9A%E6%8A%80%E8%83%BD%E5%A4%A7%E8%B5%9B-%E7%BD%91%E7%AB%99%E6%8A%80%E6%9C%AF/" title="职业技能大赛_网站技术"><img src="/../pic/phplogo.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="职业技能大赛_网站技术"/></a><div class="content"><a class="title" href="/2023/10/29/%E8%81%8C%E4%B8%9A%E6%8A%80%E8%83%BD%E5%A4%A7%E8%B5%9B-%E7%BD%91%E7%AB%99%E6%8A%80%E6%9C%AF/" title="职业技能大赛_网站技术">职业技能大赛_网站技术</a><time datetime="2023-10-29T05:36:49.000Z" title="Created 2023-10-29 13:36:49">2023-10-29</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2023/10/07/%E7%88%AC%E8%99%AB/%E5%AE%9E%E6%88%98/%E5%8D%8E%E5%9B%BE%E6%95%99%E8%82%B2%E6%97%B6%E6%94%BF%E7%83%AD%E7%82%B9/" title="华图教育时政热点"><img src="/../../../pic/%E7%88%AC%E8%99%AB.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="华图教育时政热点"/></a><div class="content"><a class="title" href="/2023/10/07/%E7%88%AC%E8%99%AB/%E5%AE%9E%E6%88%98/%E5%8D%8E%E5%9B%BE%E6%95%99%E8%82%B2%E6%97%B6%E6%94%BF%E7%83%AD%E7%82%B9/" title="华图教育时政热点">华图教育时政热点</a><time datetime="2023-10-07T08:21:16.000Z" title="Created 2023-10-07 16:21:16">2023-10-07</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2023/10/07/%E7%88%AC%E8%99%AB/%E5%AE%9E%E6%88%98/%E5%BE%AE%E5%8D%9A%E7%83%AD%E6%90%9C%E7%88%AC%E5%8F%96/" title="微博热搜爬取"><img src="/../../../pic/%E7%88%AC%E8%99%AB.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="微博热搜爬取"/></a><div class="content"><a class="title" href="/2023/10/07/%E7%88%AC%E8%99%AB/%E5%AE%9E%E6%88%98/%E5%BE%AE%E5%8D%9A%E7%83%AD%E6%90%9C%E7%88%AC%E5%8F%96/" title="微博热搜爬取">微博热搜爬取</a><time datetime="2023-10-07T07:46:47.000Z" title="Created 2023-10-07 15:46:47">2023-10-07</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2023/09/13/%E7%88%AC%E8%99%AB/%E5%AE%9E%E6%88%98/freebuf%E6%8A%A5%E5%91%8A%E7%9A%84%E6%95%B0%E6%8D%AE%E7%88%AC%E5%8F%96/" title="freebuf报告的数据爬取"><img src="/../../../pic/%E7%88%AC%E8%99%AB.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="freebuf报告的数据爬取"/></a><div class="content"><a class="title" href="/2023/09/13/%E7%88%AC%E8%99%AB/%E5%AE%9E%E6%88%98/freebuf%E6%8A%A5%E5%91%8A%E7%9A%84%E6%95%B0%E6%8D%AE%E7%88%AC%E5%8F%96/" title="freebuf报告的数据爬取">freebuf报告的数据爬取</a><time datetime="2023-09-13T11:51:42.000Z" title="Created 2023-09-13 19:51:42">2023-09-13</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2023/09/13/hexo/butterfly%E4%B8%BB%E9%A2%98%E4%BD%BF%E7%94%A8twikoo%E5%86%8Dvercel%E4%B8%8A%E9%83%A8%E7%BD%B2%E7%9A%84%E8%AF%84%E8%AE%BA%E7%B3%BB%E7%BB%9F/" title="butterfly主题使用twikoo再vercel上部署的评论系统"><img src="/../../pic/twikoo.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="butterfly主题使用twikoo再vercel上部署的评论系统"/></a><div class="content"><a class="title" href="/2023/09/13/hexo/butterfly%E4%B8%BB%E9%A2%98%E4%BD%BF%E7%94%A8twikoo%E5%86%8Dvercel%E4%B8%8A%E9%83%A8%E7%BD%B2%E7%9A%84%E8%AF%84%E8%AE%BA%E7%B3%BB%E7%BB%9F/" title="butterfly主题使用twikoo再vercel上部署的评论系统">butterfly主题使用twikoo再vercel上部署的评论系统</a><time datetime="2023-09-13T11:12:33.000Z" title="Created 2023-09-13 19:12:33">2023-09-13</time></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright">&copy;2020 - 2023 By 温柔目送</div><div class="framework-info"><span>Framework </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>Theme </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="readmode" type="button" title="Read Mode"><i class="fas fa-book-open"></i></button><button id="darkmode" type="button" title="Toggle Between Light And Dark Mode"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="Toggle between single-column and double-column"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="Setting"><i class="fas fa-cog fa-spin"></i></button><button class="close" id="mobile-toc-button" type="button" title="Table Of Contents"><i class="fas fa-list-ul"></i></button><a id="to_comment" href="#post-comment" title="Scroll To Comments"><i class="fas fa-comments"></i></a><button id="go-up" type="button" title="Back To Top"><span class="scroll-percent"></span><i class="fas fa-arrow-up"></i></button></div></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox/fancybox.umd.min.js"></script><div class="js-pjax"><script>(()=>{
  const init = () => {
    twikoo.init(Object.assign({
      el: '#twikoo-wrap',
      envId: 'https://tenderxccm.icu/',
      region: '',
      onCommentLoaded: function () {
        btf.loadLightbox(document.querySelectorAll('#twikoo .tk-content img:not(.tk-owo-emotion)'))
      }
    }, null))
  }

  const getCount = () => {
    const countELement = document.getElementById('twikoo-count')
    if(!countELement) return
    twikoo.getCommentsCount({
      envId: 'https://tenderxccm.icu/',
      region: '',
      urls: [window.location.pathname],
      includeReply: false
    }).then(function (res) {
      countELement.textContent = res[0].count
    }).catch(function (err) {
      console.error(err);
    });
  }

  const runFn = () => {
    init()
    
  }

  const loadTwikoo = () => {
    if (typeof twikoo === 'object') {
      setTimeout(runFn,0)
      return
    } 
    getScript('https://cdn.jsdelivr.net/npm/twikoo/dist/twikoo.all.min.js').then(runFn)
  }

  if ('Twikoo' === 'Twikoo' || !true) {
    if (true) btf.loadComment(document.getElementById('twikoo-wrap'), loadTwikoo)
    else loadTwikoo()
  } else {
    window.loadOtherComment = () => {
      loadTwikoo()
    }
  }
})()</script></div><div class="aplayer no-destroy" data-id="60198" data-server="netease" data-type="playlist" data-fixed="true" data-autoplay="true"> </div><div class="fb-customerchat" id="fb-customer-chat" attribution="biz_inbox"></div><script>(() => {
  document.getElementById('fb-root') ? '' : document.body.insertAdjacentHTML('afterend', '<div id="fb-root"></div>')

  window.fbAsyncInit = function() {
    FB.init({
      xfbml: true,
      version: 'v16.0'
    });
  };

  (function(d, s, id) {
    var js, fjs = d.getElementsByTagName(s)[0];
    if (d.getElementById(id)) return;
    js = d.createElement(s); js.id = id;
    js.src = 'https://connect.facebook.net/zh_CN/sdk/xfbml.customerchat.js';
    fjs.parentNode.insertBefore(js, fjs);
  }(document, 'script', 'facebook-jssdk'));

  const isChatBtn = false
  const isChatHideShow = false

  if (isChatBtn) {
    window.chatBtnFn = () => {
      const isShow = document.querySelector('.fb_customer_chat_bounce_in_v2')
      isShow ? FB.CustomerChat.hide() : FB.CustomerChat.show()
    }
  } else if (isChatHideShow) {
    window.chatBtn = {
      hide: () => {
        FB.CustomerChat.hide()
      },
      show: () => {
        FB.CustomerChat.show(false)
      }
    }
  }
})()</script><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.css" media="print" onload="this.media='all'"><script src="https://cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.js"></script><script src="https://cdn.jsdelivr.net/npm/butterfly-extsrc/metingjs/dist/Meting.min.js"></script><script src="https://cdn.jsdelivr.net/npm/pjax/pjax.min.js"></script><script>let pjaxSelectors = ["head > title","#config-diff","#body-wrap","#rightside-config-hide","#rightside-config-show",".js-pjax"]

var pjax = new Pjax({
  elements: 'a:not([target="_blank"])',
  selectors: pjaxSelectors,
  cacheBust: false,
  analytics: false,
  scrollRestoration: false
})

document.addEventListener('pjax:send', function () {

  // removeEventListener scroll 
  window.tocScrollFn && window.removeEventListener('scroll', window.tocScrollFn)
  window.scrollCollect && window.removeEventListener('scroll', scrollCollect)

  document.getElementById('rightside').style.cssText = "opacity: ''; transform: ''"
  
  if (window.aplayers) {
    for (let i = 0; i < window.aplayers.length; i++) {
      if (!window.aplayers[i].options.fixed) {
        window.aplayers[i].destroy()
      }
    }
  }

  typeof typed === 'object' && typed.destroy()

  //reset readmode
  const $bodyClassList = document.body.classList
  $bodyClassList.contains('read-mode') && $bodyClassList.remove('read-mode')

  typeof disqusjs === 'object' && disqusjs.destroy()
})

document.addEventListener('pjax:complete', function () {
  window.refreshFn()

  document.querySelectorAll('script[data-pjax]').forEach(item => {
    const newScript = document.createElement('script')
    const content = item.text || item.textContent || item.innerHTML || ""
    Array.from(item.attributes).forEach(attr => newScript.setAttribute(attr.name, attr.value))
    newScript.appendChild(document.createTextNode(content))
    item.parentNode.replaceChild(newScript, item)
  })

  GLOBAL_CONFIG.islazyload && window.lazyLoadInstance.update()

  typeof panguInit === 'function' && panguInit()

  // google analytics
  typeof gtag === 'function' && gtag('config', '', {'page_path': window.location.pathname});

  // baidu analytics
  typeof _hmt === 'object' && _hmt.push(['_trackPageview',window.location.pathname]);

  typeof loadMeting === 'function' && document.getElementsByClassName('aplayer').length && loadMeting()

  // prismjs
  typeof Prism === 'object' && Prism.highlightAll()
})

document.addEventListener('pjax:error', (e) => {
  if (e.request.status === 404) {
    pjax.loadUrl('/404.html')
  }
})</script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div></body></html>